-- Test lua app

function bsp_on_load()
	bsp_echo("Hello! I am LUA")
end

function bsp_on_reload()
	print("I say again! I am LUA!!!")
end

function bsp_on_unload()
	print("So... Lua...")
end

function bsp_on_conn(clt_id)
	print("Client " .. clt_id .. " connected")
end

function bsp_on_close(clt_id)
	print("Client " .. clt_id .. " say goodbye to everyone")
end

function bsp_on_error(clt_id)
	print("Client " .. clt_id .. " made a big mistake!")
end

function bsp_on_data(clt_id, cmd_id, data)
	local arr = {"hello", 12345, fruit = "apple", array = {a = "aaa", b = "你大爷", fuck = 1000000, arr1 = {"sanshi0815", "牛三羊"}, hdo = 10000000000, float = 0.34}}
	bsp_send(clt_id, 1000, arr)

	return len
end
